package testSpringBoot;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class MainController {

	private static Logger logger = LoggerFactory.getLogger(MainController.class);
	
	
	@Autowired
	  private MyConfig myConfig;
	 
	 @RequestMapping("/test")
     @ResponseBody
     Object  home1() {
		 logger.info("=================测试");
       return "hello word!";
     }
	
	
      @RequestMapping("/")
      @ResponseBody
      Object  home() {
        return myConfig.getMapProps();
      }
}
